{
    "channelID": "_ch{{ item.channelnum|int }}",
{% if chaincode == "samplecc" %}
    "chaincodeID": "sample_cc",
{% elif chaincode == "samplejs" %}
    "chaincodeID": "sample_js",
{% endif %}    
    "chaincodeVer": "v0",
    "logLevel": "ERROR",
    "transMode": "Simple",
    "transType": "install",
    "nProcPerOrg": "4",
    "TLS": "enabled",
    "channelOpt": {
        "name":  "{{ item.name }}",
        "action":  "create",
        "orgName": [
{% set index = ((item.channelnum|int * item.orgs|length) - (item.orgs|length - 1)) -%}
{% for orgName in item.orgs %}
{% if not loop.last %}
            "org{{ index + loop.index0 }}",
{% else %}
            "org{{ index + loop.index0 }}"
{% endif %}
{% endfor %}
        ]
    },
    "deploy": {
{% if chaincode == "samplecc" %}
        "chaincodePath": "/opt/gopath/src/github.com/hyperledger/fabric-test/chaincodes/samplecc/go",
{% elif chaincode == "samplejs" %}
        "chaincodePath": "/opt/gopath/src/github.com/hyperledger/fabric-test/chaincodes/samplecc/node",
        "language": "node",
{% endif %}
        "fcn": "init",
        "args": []
    },
    "SCFile": [
                {"ServiceCredentials":"CITest/CISCFiles/config-chan{{ item.channelnum|int }}-TLS.json"}
	]
}
